package com.test.day04.outputStream;

import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @program: 在文件中追加写/续写：使用两个参数的构造方法
 * @author: luhd
 * @create: 2021-08-05
 */
public class Demo03OutputStream {
    /**
     *  换行符：windows:\r\n    linux:/n    mac:/r
     */
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("c.txt",true);
        for (int i = 0; i < 10; i++) {
            fos.write("你好".getBytes());
            fos.write("\r\n".getBytes());
        }
        fos.close();
    }
}
